package parttern.template;

public abstract class AbsComputer {

    protected void powerOn() {
        System.out.println("开机");
    }

    protected void check() {
        System.out.println("设备检查");
    }

    protected void loadOS() {
        System.out.println("载入操作系统");
    }

    protected void login() {
        System.out.println("登录");
    }


    public final void useComputer() {
        powerOn();
        check();
        loadOS();
        login();
    }


    ///test
    public static void main(String[] args) {
        new SimpleComputer().useComputer();
        System.out.println("---");
        new MilitaryComputer().useComputer();
    }
}
